package com.qf.micrograss.grass.task;


import com.qf.micrograss.grass.service.GrassService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 天--道--酬--勤
 *
 * @author LiangGaoQiang
 * @ClassName GrassTask
 * @Date: 2025/6/2 14:31
 * @Description: 描述
 */

@Component
public class GrassTask {

    @Resource
    private GrassService grassService;

    // @Scheduled(cron = "0 * * * * * ?")
    public void updteLikeNumTask() {
        grassService.updateGrassLikeNumTask();
    }

    @XxlJob( "updateLikeNumTask")
    public void xxlJobUpdateLikeNUmTask() {
        System.out.println("xxl job 定时任务执行");
        grassService.updateGrassLikeNumTask();
    }
}
